<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('comments/index')}">评论列表</a></li>		
		</ul>
		<div class="top-form-wrapper margin-top-20 clearfix">
			<form class="well form-inline" method="get" name="form1" action="{:url('comments/index')}">
				用户ID：
				<input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
					   placeholder="请输入用户ID">
				关键字：
				<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
					   placeholder="评论内容">
				
				<input type="submit" class="btn btn-primary" value="搜索" onclick="form1.action='{:url('comments/index')}';form1.submit();">

			</form>


		</div>		
		
		<table class="table table-hover table-bordered margin-top-20">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>用户（UID）</th>
					<th>内容</th>
					<th>状态</th>
					<th>时间</th>
					<th width="160">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<php>
					$status = array('0'=>'待审核','1'=>'审核通过','2'=>'审核拒绝');
				</php>
				<foreach name="list" item="vo">
				<tr>			
					<td>{$vo.id}</td>
					<td>{$vo.userinfo['user_nickname']}（{$vo.uid}）</td>
					<td>{$vo.content}</td>
					<td>{$status[$vo.status]}</td>
					<td>{$vo.addtime|date="Y-m-d H:i:s"}</td>

					<td>
						<a class="btn btn-xs btn-primary" href="{:url('comments/edit',array('id'=>$vo['id'],'type'=>$type))}">{:lang('EDIT')}</a>
						<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('comments/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
					</td>
				</tr>
				</foreach>
				
			</tbody>
		</table>

		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>